package com.tjp.eight.ui.fragment.mywallet;

import android.graphics.Color;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.tjp.eight.R;
import com.tjp.eight.base.BaseActivitySwipe;
import com.tjp.eight.comment.AppManager;
import com.tjp.eight.utils.BitmapUtils;
import com.tjp.eight.utils.DipPxSpUtils;

/**
 * Created by Administrator on 2017/2/28.
 */

public class ActivityMyWallet extends BaseActivitySwipe {
    @Override
    public void setFragment() {
        changeFragment(new FragmentMyWallet());
    }

    @Override
    public void initTitleAll() {
        rl_head_nav.setVisibility(View.GONE);
        tvTitle.setText("我的金币");
        ivLeft.setImageBitmap(BitmapUtils.getBitmap(this, R.drawable.top_back));
        rlLeft.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AppManager.getAppManager().finishActivity(ActivityMyWallet.this);
            }
        });
        rlLeft.setVisibility(View.VISIBLE);

        TextView moreGet = new TextView(this);
        moreGet.setTextColor(Color.parseColor("#000000"));
        moreGet.setText("提现明细");
        moreGet.setTextSize(10);
        moreGet.setGravity(Gravity.CENTER);
        RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
        params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
        params.setMargins(0, 0, DipPxSpUtils.dip2px(this, 10), 0);
        moreGet.setLayoutParams(params);
        moreGet.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //web
            }
        });
        rl_head_nav.addView(moreGet);
    }
}
